package com.atguigu.gulimall.order.dao;

import com.atguigu.gulimall.order.entity.OrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import feign.Param;

/**
 * 订单
 * 
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2019-10-08 09:56:16
 */
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {
    @Select("UPDATE oms_order SET `status` = #{code},modify_time = NOW(),pay_type = #{payType},payment_time = NOW() WHERE order_sn = #{orderSn}")
    void updateOrderStatus(@Param("orderSn") String orderSn, @Param("code") Integer code,
            @Param("payType") Integer payType);

}
